package com.ming.springboot.data;

/**
 * Created by mqsi on 2022/5/15 17:01
 */
public enum ResultCode {
	SUCCESS(0, "成功"),
	SYSTEM_ERROR(10000, "系统异常，请稍后重试"),
	UNAUTHORIZED(10401, "签名验证失败"),
	PARAM_IS_INVALID(10001, "参数无效"),
	USER_HAS_EXISTED(20001, "用户名已处在"),
	USER_NOT_FIND(20002, "用户名不存在"),
	NEED_LOGIN(30001, "请先登录系统"),
	LOGIN_SUCCESS(30000, "登录成功"),
	LOGIN_FAIL(30002, "登录失败"),
	NEED_AUTHORIZED(30003, "需要授权"),
	LOGOUT_SUCCESS(30004, "登出成功");


	ResultCode(Integer code, String message) {
		this.code = code;
		this.message = message;
	}

	private Integer code;
	private String message;

	public Integer getCode() {
		return code;
	}

	public String getMessage() {
		return message;
	}
}
